#pragma once

#include <vector>
#include <utility>

struct complex {
	double real;
	double imag;
	complex(double real, double imag):real(real), imag(imag){};
};

std::vector<complex> test_values;
std::vector<std::pair<complex,complex> > test_binary_values;

void load_values(){
	test_values.push_back(complex(0,1.19209289550781E-07));
	test_values.push_back(complex(0,-1.19209289550781E-07));
	test_values.push_back(complex(0,0.5));
	test_values.push_back(complex(0,-0.5));
	test_values.push_back(complex(0,1));
	test_values.push_back(complex(0,-1));
	test_values.push_back(complex(0,2));
	test_values.push_back(complex(0,-2));
	test_values.push_back(complex(0,8388608));
	test_values.push_back(complex(0,-8388608));
	test_values.push_back(complex(1.19209289550781E-07,0));
	test_values.push_back(complex(-1.19209289550781E-07,0));
	test_values.push_back(complex(1.19209289550781E-07,1.19209289550781E-07));
	test_values.push_back(complex(1.19209289550781E-07,-1.19209289550781E-07));
	test_values.push_back(complex(-1.19209289550781E-07,1.19209289550781E-07));
	test_values.push_back(complex(-1.19209289550781E-07,-1.19209289550781E-07));
	test_values.push_back(complex(1.19209289550781E-07,0.5));
	test_values.push_back(complex(1.19209289550781E-07,-0.5));
	test_values.push_back(complex(-1.19209289550781E-07,0.5));
	test_values.push_back(complex(-1.19209289550781E-07,-0.5));
	test_values.push_back(complex(1.19209289550781E-07,1));
	test_values.push_back(complex(1.19209289550781E-07,-1));
	test_values.push_back(complex(-1.19209289550781E-07,1));
	test_values.push_back(complex(-1.19209289550781E-07,-1));
	test_values.push_back(complex(1.19209289550781E-07,2));
	test_values.push_back(complex(1.19209289550781E-07,-2));
	test_values.push_back(complex(-1.19209289550781E-07,2));
	test_values.push_back(complex(-1.19209289550781E-07,-2));
	test_values.push_back(complex(1.19209289550781E-07,8388608));
	test_values.push_back(complex(1.19209289550781E-07,-8388608));
	test_values.push_back(complex(-1.19209289550781E-07,8388608));
	test_values.push_back(complex(-1.19209289550781E-07,-8388608));
	test_values.push_back(complex(0.5,0));
	test_values.push_back(complex(-0.5,0));
	test_values.push_back(complex(0.5,1.19209289550781E-07));
	test_values.push_back(complex(0.5,-1.19209289550781E-07));
	test_values.push_back(complex(-0.5,1.19209289550781E-07));
	test_values.push_back(complex(-0.5,-1.19209289550781E-07));
	test_values.push_back(complex(0.5,0.5));
	test_values.push_back(complex(0.5,-0.5));
	test_values.push_back(complex(-0.5,0.5));
	test_values.push_back(complex(-0.5,-0.5));
	test_values.push_back(complex(0.5,1));
	test_values.push_back(complex(0.5,-1));
	test_values.push_back(complex(-0.5,1));
	test_values.push_back(complex(-0.5,-1));
	test_values.push_back(complex(0.5,2));
	test_values.push_back(complex(0.5,-2));
	test_values.push_back(complex(-0.5,2));
	test_values.push_back(complex(-0.5,-2));
	test_values.push_back(complex(0.5,8388608));
	test_values.push_back(complex(0.5,-8388608));
	test_values.push_back(complex(-0.5,8388608));
	test_values.push_back(complex(-0.5,-8388608));
	test_values.push_back(complex(1,0));
	test_values.push_back(complex(-1,0));
	test_values.push_back(complex(1,1.19209289550781E-07));
	test_values.push_back(complex(1,-1.19209289550781E-07));
	test_values.push_back(complex(-1,1.19209289550781E-07));
	test_values.push_back(complex(-1,-1.19209289550781E-07));
	test_values.push_back(complex(1,0.5));
	test_values.push_back(complex(1,-0.5));
	test_values.push_back(complex(-1,0.5));
	test_values.push_back(complex(-1,-0.5));
	test_values.push_back(complex(1,1));
	test_values.push_back(complex(1,-1));
	test_values.push_back(complex(-1,1));
	test_values.push_back(complex(-1,-1));
	test_values.push_back(complex(1,2));
	test_values.push_back(complex(1,-2));
	test_values.push_back(complex(-1,2));
	test_values.push_back(complex(-1,-2));
	test_values.push_back(complex(1,8388608));
	test_values.push_back(complex(1,-8388608));
	test_values.push_back(complex(-1,8388608));
	test_values.push_back(complex(-1,-8388608));
	test_values.push_back(complex(2,0));
	test_values.push_back(complex(-2,0));
	test_values.push_back(complex(2,1.19209289550781E-07));
	test_values.push_back(complex(2,-1.19209289550781E-07));
	test_values.push_back(complex(-2,1.19209289550781E-07));
	test_values.push_back(complex(-2,-1.19209289550781E-07));
	test_values.push_back(complex(2,0.5));
	test_values.push_back(complex(2,-0.5));
	test_values.push_back(complex(-2,0.5));
	test_values.push_back(complex(-2,-0.5));
	test_values.push_back(complex(2,1));
	test_values.push_back(complex(2,-1));
	test_values.push_back(complex(-2,1));
	test_values.push_back(complex(-2,-1));
	test_values.push_back(complex(2,2));
	test_values.push_back(complex(2,-2));
	test_values.push_back(complex(-2,2));
	test_values.push_back(complex(-2,-2));
	test_values.push_back(complex(2,8388608));
	test_values.push_back(complex(2,-8388608));
	test_values.push_back(complex(-2,8388608));
	test_values.push_back(complex(-2,-8388608));
	test_values.push_back(complex(8388608,0));
	test_values.push_back(complex(-8388608,0));
	test_values.push_back(complex(8388608,1.19209289550781E-07));
	test_values.push_back(complex(8388608,-1.19209289550781E-07));
	test_values.push_back(complex(-8388608,1.19209289550781E-07));
	test_values.push_back(complex(-8388608,-1.19209289550781E-07));
	test_values.push_back(complex(8388608,0.5));
	test_values.push_back(complex(8388608,-0.5));
	test_values.push_back(complex(-8388608,0.5));
	test_values.push_back(complex(-8388608,-0.5));
	test_values.push_back(complex(8388608,1));
	test_values.push_back(complex(8388608,-1));
	test_values.push_back(complex(-8388608,1));
	test_values.push_back(complex(-8388608,-1));
	test_values.push_back(complex(8388608,2));
	test_values.push_back(complex(8388608,-2));
	test_values.push_back(complex(-8388608,2));
	test_values.push_back(complex(-8388608,-2));
	test_values.push_back(complex(8388608,8388608));
	test_values.push_back(complex(8388608,-8388608));
	test_values.push_back(complex(-8388608,8388608));
	test_values.push_back(complex(-8388608,-8388608));
}

void load_binary_values(){
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,1.19209289550781E-07), complex(1.19209289550781E-07,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,1.19209289550781E-07), complex(0,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,-1.19209289550781E-07), complex(0,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,0.5), complex(0,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,-0.5), complex(0,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,1), complex(0,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,-1), complex(0,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,2), complex(0,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,-2), complex(0,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,8388608), complex(0,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0,-8388608), complex(1.19209289550781E-07,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,0), complex(-1.19209289550781E-07,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,0), complex(1.19209289550781E-07,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,1.19209289550781E-07), complex(1.19209289550781E-07,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,-1.19209289550781E-07), complex(-1.19209289550781E-07,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,1.19209289550781E-07), complex(-1.19209289550781E-07,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,-1.19209289550781E-07), complex(1.19209289550781E-07,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,0.5), complex(1.19209289550781E-07,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,-0.5), complex(-1.19209289550781E-07,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,0.5), complex(-1.19209289550781E-07,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,-0.5), complex(1.19209289550781E-07,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,1), complex(1.19209289550781E-07,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,-1), complex(-1.19209289550781E-07,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,1), complex(-1.19209289550781E-07,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,-1), complex(1.19209289550781E-07,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,2), complex(1.19209289550781E-07,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,-2), complex(-1.19209289550781E-07,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,2), complex(-1.19209289550781E-07,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,-2), complex(1.19209289550781E-07,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,8388608), complex(1.19209289550781E-07,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1.19209289550781E-07,-8388608), complex(-1.19209289550781E-07,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,8388608), complex(-1.19209289550781E-07,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1.19209289550781E-07,-8388608), complex(0.5,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,0), complex(-0.5,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,0), complex(0.5,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,1.19209289550781E-07), complex(0.5,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,-1.19209289550781E-07), complex(-0.5,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,1.19209289550781E-07), complex(-0.5,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,-1.19209289550781E-07), complex(0.5,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,0.5), complex(0.5,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,-0.5), complex(-0.5,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,0.5), complex(-0.5,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,-0.5), complex(0.5,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,1), complex(0.5,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,-1), complex(-0.5,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,1), complex(-0.5,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,-1), complex(0.5,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,2), complex(0.5,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,-2), complex(-0.5,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,2), complex(-0.5,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,-2), complex(0.5,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,8388608), complex(0.5,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(0.5,-8388608), complex(-0.5,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,8388608), complex(-0.5,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-0.5,-8388608), complex(1,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,0), complex(-1,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,0), complex(1,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,1.19209289550781E-07), complex(1,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,-1.19209289550781E-07), complex(-1,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,1.19209289550781E-07), complex(-1,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,-1.19209289550781E-07), complex(1,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,0.5), complex(1,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,-0.5), complex(-1,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,0.5), complex(-1,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,-0.5), complex(1,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,1), complex(1,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,-1), complex(-1,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,1), complex(-1,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,-1), complex(1,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,2), complex(1,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,-2), complex(-1,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,2), complex(-1,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,-2), complex(1,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,8388608), complex(1,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(1,-8388608), complex(-1,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,8388608), complex(-1,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-1,-8388608), complex(2,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,0), complex(-2,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,0), complex(2,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,1.19209289550781E-07), complex(2,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,-1.19209289550781E-07), complex(-2,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,1.19209289550781E-07), complex(-2,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,-1.19209289550781E-07), complex(2,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,0.5), complex(2,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,-0.5), complex(-2,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,0.5), complex(-2,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,-0.5), complex(2,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,1), complex(2,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,-1), complex(-2,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,1), complex(-2,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,-1), complex(2,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,2), complex(2,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,-2), complex(-2,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,2), complex(-2,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,-2), complex(2,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,8388608), complex(2,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(2,-8388608), complex(-2,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,8388608), complex(-2,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-2,-8388608), complex(8388608,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,0), complex(-8388608,0)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,0), complex(8388608,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,1.19209289550781E-07), complex(8388608,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,-1.19209289550781E-07), complex(-8388608,1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,1.19209289550781E-07), complex(-8388608,-1.19209289550781E-07)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,-1.19209289550781E-07), complex(8388608,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,0.5), complex(8388608,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,-0.5), complex(-8388608,0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,0.5), complex(-8388608,-0.5)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,-0.5), complex(8388608,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,1), complex(8388608,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,-1), complex(-8388608,1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,1), complex(-8388608,-1)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,-1), complex(8388608,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,2), complex(8388608,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,-2), complex(-8388608,2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,2), complex(-8388608,-2)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,-2), complex(8388608,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,8388608), complex(8388608,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(8388608,-8388608), complex(-8388608,8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,8388608), complex(-8388608,-8388608)));
	test_binary_values.push_back(std::pair<complex, complex>(complex(-8388608,-8388608), complex(0,1.19209289550781E-07)));
}